/*
examples how to use "dbsql2xml"
these mapping XML files works without modification only on certain configuration of HSQLDB 1.8.0
otherwise You need to modify them
*/
import java.util.*;
import org.w3c.dom.*;

public class examplesOfUse {

  public static void main(String[] args) {
    Date date;
    Date oldDate;
    /*
    standard output should be used for debugging
    File should beused for standalone conversion tool 
    String and Document should be used for server side component
      such as servlet or application server
    */
    try {

    	//do export into XML Document
        System.out.println("tree into XML Document: ");
        oldDate = new Date();
        dbsql2xml test08 = new dbsql2xml("Customers.xml", "dbsql2xml.xsd", "$gvG01", "001", "treeXMLOutpp.xml");
        //Document outDocument08 = test08.doExportIntoDocument();
        date = new Date();
        System.out.println(date.getTime() - oldDate.getTime());
        test08.doExportIntoFile();

    } catch (Exception e) {
      System.out.println(e.getMessage());
      System.out.println(e.getCause());
    } 
  }
  
}
